package com.dongdong.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdong.mapper.TbAreasMapper;
import com.dongdong.pojo.TbAreas;
import com.dongdong.pojo.TbAreasExample;
import com.dongdong.service.AreasService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Deacription TODO
 * @Author Lenovo
 * @Date 2020/12/22 17:05
 * @Version 1.0
 **/
@Service
@Component
public class AreasServiceImpl implements AreasService {

    @Resource
    private TbAreasMapper tbAreasMapper;

    @Override
    public List<TbAreas> getTown(String cityId) {
        TbAreasExample example = new TbAreasExample();
        TbAreasExample.Criteria criteria = example.createCriteria();
        criteria.andCityidEqualTo(cityId);
        return tbAreasMapper.selectByExample(example);
    }
}

